<%@ page contentType="text/html;charset=UTF-8" language="java" %><!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="${ctx}/statics/css/manage.css">
  <title>设置</title>
</head>
<body>

<section class="settings-wrap">
  <div class="table-wrap">
    <table id="deviceTable" lay-filter="deviceTable"></table>
  </div>
  <div class="operate-btns">
    <div>
<%--      <button class="layui-btn layui-btn-primary layui-btn-lg addBtn"><i class="layui-icon layui-icon-addition"></i>新增</button>--%>
      <button class="layui-btn layui-btn-primary layui-btn-lg editBtn"><i class="layui-icon layui-icon-edit"></i>编辑</button>
      <button class="layui-btn layui-btn-primary layui-btn-lg deleteBtn"><i class="layui-icon layui-icon-delete"></i>删除</button>
<%--      <button class="layui-btn layui-btn-primary layui-btn-lg intervalBtn"><i class="layui-icon layui-icon-log"></i>频率</button>--%>
    </div>
  </div>
</section>

<!--toolbar-->
<script type="text/html" id="toolbar">
  <button class="layui-btn getCheckData" lay-event="getCheckData">获取选中行数据</button>
</script>

<!-- Modal/行编辑 -->
<script type="text/html" id="edit-tpl">
  <form class="layui-form edit-param sensorManage-layer" lay-filter="edit-param" action="#">
    <input type="hidden" class="layui-input" name="meterCode">
    <div class="infowrap">
      <div class="layui-form-item">
        <label class="layui-form-label">所在区域</label>
        <div class="layui-input-inline">
          <select class="layui-input areaMenu" name="areaId"></select>
        </div>
      </div>
        <div class="layui-form-item">
            <label class="layui-form-label">仪表类型</label>
            <div class="layui-input-inline">
                <select class="layui-input typeMenu" name="deviceTypeCode">
                    <option value="1" selected>水表</option>
                    <option value="0">电表</option>
                </select>
            </div>
        </div>
      <div class="layui-form-item">
        <label class="layui-form-label">监控位置</label>
        <div class="layui-input-inline">
          <input type="text" class="layui-input" name="anotherName">
        </div>
      </div>
        <div class="layui-form-item">
            <label class="layui-form-label">监控位置编号</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="deviceName" placeholder="请输入">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">日标准量</label>
            <div class="layui-input-inline">
                <input type="number" class="layui-input" name="standard">
            </div>
        </div>
      <div class="layui-form-item">
        <label class="layui-form-label">IP简称</label>
        <div class="layui-input-inline">
          <select name="gatewayId" class="layui-input gatewayMenu"></select>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">仪表识别码</label>
        <div class="layui-input-inline">
          <select name="readerCode" class="layui-input sensorMenu"></select>
        </div>
      </div>
<%--      <div class="layui-form-item">--%>
<%--        <label class="layui-form-label">水表位数</label>--%>
<%--        <div class="layui-input-inline">--%>
<%--          <input type="number" class="layui-input" name="meterDigit">--%>
<%--        </div>--%>
<%--      </div>--%>
<%--      <div class="layui-form-item">--%>
<%--        <label class="layui-form-label">水表精度</label>--%>
<%--        <div class="layui-input-inline">--%>
<%--          <input type="number" class="layui-input" name="meterDecimal">--%>
<%--        </div>--%>
<%--      </div>--%>
      <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-inline">
          <textarea name="descrition" placeholder="请输入" class="layui-textarea"></textarea>
        </div>
      </div>
      <div class="layui-form-item">
        <div class="fr">
          <button class="layui-btn layui-btn-sm" lay-submit lay-filter="edit-param">确定</button>
          <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
        </div>
      </div>
    </div>
  </form>
</script>

<!--Modal/设置频率-->
<script type="text/html" id="interval-tpl">
  <form class="layui-form interval-param" lay-filter="interval-param" action="#">
    <input name="pkid" type="hidden" value=""/>
    <div class="layui-form-item">
      <label class="layui-form-label">频率</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="sendTime">
      </div>
    </div>
    <div class="layui-form-item">
      <div class="fr">
        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="interval-param">确定</button>
        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
      </div>
    </div>
  </form>
</script>
<!-- Modal/新增设备 -->
<script type="text/html" id="add-tpl">
  <form class="layui-form add-param sensorManage-layer" lay-filter="add-param" action="#">
    <div class="layui-form-item">
      <label class="layui-form-label">所在区域</label>
      <div class="layui-input-inline">
        <select class="layui-input areaMenu" name="areaId"></select>
      </div>
    </div>
      <div class="layui-form-item">
          <label class="layui-form-label">仪表类型</label>
          <div class="layui-input-inline">
              <select class="layui-input typeMenu" name="deviceTypeCode">
                  <option value="1" selected>水表</option>
                  <option value="0">电表</option>
              </select>
          </div>
      </div>
    <div class="layui-form-item">
      <label class="layui-form-label">监控位置</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="anotherName" placeholder="请输入">
      </div>
    </div>
      <div class="layui-form-item">
          <label class="layui-form-label">监控位置编号</label>
          <div class="layui-input-inline">
              <input type="text" class="layui-input" name="deviceName" placeholder="请输入">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">日标准量</label>
          <div class="layui-input-inline">
              <input type="number" class="layui-input" name="standard" placeholder="请输入">
          </div>
      </div>
    <div class="layui-form-item">
      <label class="layui-form-label">IP简称</label>
      <div class="layui-input-inline">
        <select name="gatewayId" class="gatewayMenu"></select>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">仪表识别码</label>
      <div class="layui-input-inline">
        <select name="readerCode" class="sensorMenu"></select>
      </div>
    </div>
<%--    <div class="layui-form-item">--%>
<%--      <label class="layui-form-label">水表位数</label>--%>
<%--      <div class="layui-input-inline">--%>
<%--        <input type="number" class="layui-input" name="meterDigit" placeholder="请输入">--%>
<%--      </div>--%>
<%--    </div>--%>
<%--    <div class="layui-form-item">--%>
<%--      <label class="layui-form-label">水表精度</label>--%>
<%--      <div class="layui-input-inline">--%>
<%--        <input type="number" class="layui-input" name="meterDecimal" placeholder="请输入">--%>
<%--      </div>--%>
<%--    </div>--%>
    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-inline">
        <textarea name="descrition" placeholder="请输入" class="layui-textarea"></textarea>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="fr">
        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="add-param">确定</button>
        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
      </div>
    </div>
  </form>
</script>
<script type="text/html" id="area-tpl">
  {{#  layui.each(d, function(index, item){ }}
  <option value="{{ item.areaId }}">{{ item.areaName }}</option>
  {{#  }); }}
</script>
<script type="text/html" id="gateway-tpl">
  {{#  layui.each(d, function(index, item){ }}
  <option value="{{ item.gatewayId }}">{{ item.gatewayName }}</option>
  {{#  }); }}
</script>
<script type="text/html" id="sensor-tpl">
  {{#  layui.each(d, function(index, item){ }}
  <option value="{{ item.readerCode }}">{{ item.readerCode }}</option>
  {{#  }); }}
</script>

<script src="${ctx}/statics/js/settings.js?v=${v}"></script>
</body>
</html>
